#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    // 初始化下拉框
    ui->comboBox->addItem("凉皮"); ui->comboBox->addItem("凉面");
    ui->comboBox_2->addItem("可乐"); ui->comboBox_2->addItem("雪碧");

    // 初始化微调框
    ui->spinBox->setValue(6); ui->spinBox->setValue(7.5);
    ui->spinBox_2->setRange(3, 7);
}

void Widget::on_pushButton_clicked()
{
    qDebug() << "当前下单："
             << ui->comboBox->currentText() <<": " << ui->spinBox->value()
             << ui->comboBox_2->currentText() << ": " << ui->spinBox_2->value();
}


Widget::~Widget()
{
    delete ui;
}


